<cc:page type="normal" style="standard" showSidebar="false" showHeader="false" />
<cc>

   CCService cs = new CCService(userInfo);

   String key = request.getParameter("key") == null ? "": request.getParameter("key") + "";
   String sql = "";
   switch(key){
    case "sszsxmccname":
       sql ="select b.id value,b.name text  from (select distinct sszsxm from zskhxx where is_deleted='0' and ownerid='" + userInfo.getUserId() + "') a left join (select id,name from zsxm ) b on a.sszsxm = b.id ";
       break;
    case "sszdfzccname":
       sql ="select b.id value,b.name text  from (select distinct sszdfz from zskhxx where is_deleted='0' and ownerid='" + userInfo.getUserId() + "') a left join (select id,name from zdfz ) b on a.sszdfz = b.id ";
       break;
    case "zsfqccname":
       sql ="select b.id value,b.name text  from (select distinct zsfq from zskhxx where is_deleted='0' and ownerid='" + userInfo.getUserId() + "') a left join (select id,name from zsfq ) b on a.zsfq = b.id ";
       break;
    case "lyfl":
       sql ="select b.id value,b.name text  from (select distinct lyfl from zskhxx where is_deleted='0' and ownerid='" + userInfo.getUserId() + "') a left join (select id,name from qdly where jc = 1) b on a.lyfl = b.id ";
       break;
    case "ejfl":
       String fjfl_1 = request.getParameter("fjfl") == null ? "": request.getParameter("fjfl") + "";
       sql ="select b.id value,b.name text from (select distinct ejfl from zskhxx where is_deleted='0' and ownerid='" + userInfo.getUserId() + "') a left join (select id,name from qdly where fjfl = '"+ fjfl_1 +"') b on a.ejfl = b.id ";
       break;
    case "khlyqd":
       String fjfl_2 = request.getParameter("fjfl") == null ? "": request.getParameter("fjfl") + "";
       sql ="select b.id value,b.name text from (select distinct khlyqd from zskhxx where is_deleted='0' and ownerid='" + userInfo.getUserId() + "') a left join (select id,name from qdly where fjfl = '"+ fjfl_2 +"') b on a.khlyqd = b.id ";
       break;
    default:
       break;
   }
   // sql = "";
   List<CCObject> ncxmList = cs.cqlQuery("", sql);

   net.sf.json.JSONArray js = net.sf.json.JSONArray.fromObject(ncxmList);   
   request.setAttribute("jsonmsg", js.toString());
</cc>
<cc:forward page="/platform/activity/task/getNodes.jsp"/>